---
title: dub.analytics.clicks.timeseries
sidebarTitle: Timeseries
description: Retrieve timeseries click analytics for a link, a domain, or the authenticated workspace.
---

import AnalyticsArguments from "/snippets/analytics-arguments.mdx";

<Note>
  Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or
  higher.
</Note>

<AnalyticsArguments />

## Response

<ResponseField name="start" type="string" required>
  The starting timestamp of the interval
</ResponseField>

<ResponseField name="clicks" type="number" required>
  The number of clicks in the interval
</ResponseField>

<RequestExample>

```typescript
await dub.analytics.clicks.timeseries({
  key: "dummy",
  domain: "dub.sh",
  interval: "30d",
});
```

</RequestExample>

<ResponseExample>

```typescript
[
  { start: "2024-03-20T00:00:00.000Z", clicks: 15 },
  { start: "2024-03-21T00:00:00.000Z", clicks: 20 },
  { start: "2024-03-22T00:00:00.000Z", clicks: 18 },
  { start: "2024-03-23T00:00:00.000Z", clicks: 14 },
];
```

</ResponseExample>
